﻿<%@ Page Title="" Language="C#" MasterPageFile="~/skin.Master" AutoEventWireup="true" CodeBehind="File.aspx.cs" Inherits="DataShow.File" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>

<asp:Content ID="Content1" ContentPlaceHolderID="home_header" runat="server">
    <style type="text/css">
        .widget-content {
            overflow: hidden;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cph_home" runat="server">
    <div style="margin-top: 10px;">
        <ul class="breadcrumb">
            <li><a href="<%:IndexUrl %>">首页</a> <span class="divider">/</span></li>
            <li class="active">常用业务文件</li>
        </ul>
    </div>
    <div class="row-fluid">
        <div class="span12">
            <div class="widget-box">
                <div class="widget-title">
                    <span class="icon">
                        <i class="icon-plus"></i>
                    </span>
                    <h5>功能栏</h5>
                </div>
                <div class="widget-content nopadding">
                    <button class="btn btn-primary" data-toggle="modal" data-target="#myModal" id="btn_add_" runat="server">上传文件</button>
                    <asp:Button runat="server" ID="btn_check_all" Text="全选" CssClass="btn-primary btn" OnClick="btn_check_all_Click" />
                    <asp:Button runat="server" ID="btn_deleete_checked" Text="删除选中" CssClass="btn-primary btn" OnClick="btn_deleete_checked_Click" />

                    <div class="input-append pull-right">
                        <asp:CheckBox runat="server" ID="cbx_by_month" Checked="false" />
                        <label style="display: inline-block; padding-top: 5px;">条件搜索：</label>
                        <asp:TextBox runat="server" ID="txt_filename" />
                        <asp:Button runat="server" ID="btn_search" Text="搜索" CssClass="btn" OnClick="btn_search_Click" />
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="row-fluid">
        <div class="span12">
            <div class="widget-box" style="margin-top: 0">
                <div class="widget-title">
                    <span class="icon">
                        <i class="icon-plus"></i>
                    </span>
                    <h5>搜索结果</h5>
                </div>
                <div class="widget-content nopadding">
                    <asp:GridView ID="gv_result" runat="server" AutoGenerateColumns="False" BorderWidth="0" EmptyDataText="暂无排班表" CssClass="table" GridLines="None">
                        <Columns>
                            <asp:TemplateField HeaderText="ID" HeaderStyle-CssClass="w15" Visible="false">
                                <ItemTemplate>
                                    <asp:Label ID="ID" runat="server" Text='<%#Eval("id") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="选择">
                                <ItemTemplate>
                                    <asp:CheckBox runat="server" ID="Select" Checked="false" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="文件名" HeaderStyle-CssClass="w15">
                                <ItemTemplate>
                                    <asp:Label ID="labdate" runat="server"><%#Eval("filename") %></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="操作" HeaderStyle-CssClass="w40">
                                <ItemTemplate>
                                    <a href='<%#EchoFileName(Eval("downloadpath").ToString()) %>'>点此下载</a>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                    <div class="alert" id="div_nodata" runat="server">
                        <i class="icon-warning-sign"></i>
                        暂无数据
                    </div>
                    <webdiyer:AspNetPager ID="anp" runat="server" CustomInfoHTML="总计%RecordCount%条记录"
                        FirstPageText="首页" LastPageText="尾页" NextPageText="下一页" OnPageChanged="anp_PageChanged"
                        PrevPageText="上一页" ShowCustomInfoSection="Left" ShowPageIndexBox="Never" PageSize="20"
                        CssClass="paginator" CurrentPageButtonClass="cpb" AlwaysShow="True" CustomInfoSectionWidth="250px">
                    </webdiyer:AspNetPager>
                </div>
            </div>
        </div>

    </div>

    <!--上传文件模态窗口-->
    <div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
            <h3 id="myModalLabel" class="xunyue_myModalLabel" runat="server">文件上传</h3>
        </div>
        <div class="modal-body">
            <div class="control-group">

                <!-- Text input-->
                <label class="control-label" for="input01">请输入文件名</label>
                <div class="controls">
                    <asp:TextBox runat="server" ID="txt_file_name" />
                    <p class="help-block"></p>
                </div>
            </div>
            <asp:FileUpload runat="server" ID="file" />
        </div>
        <div class="modal-footer">
            <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
            <asp:Button runat="server" ID="btn_save" ClientIDMode="Static" CssClass="btn btn-primary xunyue_btn_save" OnClick="btn_save_Click" Text="上传" />
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="home_script" runat="server">
    <script type="text/javascript">
        $("input[type='checkbox']").css("margin-top", "10px");
    </script>
</asp:Content>
